// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'Id',
        footer: "Foots",
        cnName: '生产退料',
        name: 'ProductionMaterials',
        url: "/ProductionMaterials/",
        sortName: "Id"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"MateCode":"","MateName":"","MateType":"","ProductionOrder":"","Workstation":"","MateTime":"","Documents":"","Remark":""};
    const editFormOptions = [[{"title":"退料单编号","required":true,"field":"MateCode"}],
                              [{"title":"退料单名称","required":true,"field":"MateName"}],
                              [{"dataKey":"退料类型","data":[],"title":"退料类型","required":true,"field":"MateType","type":"select"}],
                              [{"title":"生产工单","required":true,"field":"ProductionOrder"}],
                              [{"title":"工作站","required":true,"field":"Workstation"}],
                              [{"title":"退料日期","required":true,"field":"MateTime","type":"datetime"}],
                              [{"dataKey":"单据状态","data":[],"title":"单据状态","required":true,"field":"Documents","type":"select"}],
                              [{"title":"备注","required":true,"field":"Remark","type":"textarea"}]];
    const searchFormFields = {"MateCode":"","MateName":"","MateType":"","ProductionOrder":""};
    const searchFormOptions = [[{"title":"退料单编号","field":"MateCode"},{"title":"退料单名称","field":"MateName"},{"title":"生产工单","field":"ProductionOrder"},{"dataKey":"退料类型","data":[],"title":"退料类型","field":"MateType","type":"select"}]];
    const columns = [{field:'Id',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'MateCode',title:'退料单编号',type:'string',width:110,require:true,align:'left'},
                       {field:'MateName',title:'退料单名称',type:'string',width:110,require:true,align:'left'},
                       {field:'MateType',title:'退料类型',type:'string',bind:{ key:'退料类型',data:[]},width:110,require:true,align:'left'},
                       {field:'ProductionOrder',title:'生产工单',type:'string',width:110,require:true,align:'left'},
                       {field:'Workstation',title:'工作站',type:'string',width:110,require:true,align:'left'},
                       {field:'MateTime',title:'退料日期',type:'datetime',width:150,require:true,align:'left'},
                       {field:'Documents',title:'单据状态',type:'int',bind:{ key:'单据状态',data:[]},width:110,require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:110,require:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}